<template>
  <div class="app-container">
    <div class="td">
      <div class="block">
        <div>币种名称</div>
        <div>代币合约地址</div>
        <div>兑换比例</div>
      </div>
      <div class="block">
        <div>TDEFI / TDEFIOS</div>
        <div>
          <el-input
            v-model="address"
            style="width: 200px"
          />
        </div>
        <div>
          <el-input
            v-model="rate"
            style="width: 200px"
          />
        </div>
      </div>
    </div>
    <el-button type="primary" @click="setRate">确定</el-button>
  </div>
</template>

<script>
import { setTokenRate } from "@/api/index";
export default {
  data() {
    return {
      address:'',
      rate:'',
    };
  },
  watch: {},

  methods: {
    setRate() {
      setTokenRate({
        tokenAddress:this.address,
        rate:this.rate
      }).then(res => {
        console.log(res)
      })
    }
  },
};
</script>
<style lang="scss">
.block {
  display: flex;
  margin-bottom: 20px;
  align-items: center;
  div {
    width: 220px;
  }
}
</style>

